<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Introduction to Ibator</title>
  <link type="text/css" rel="stylesheet" href="ibator.css"/>
</head>
<body>

<div class="menuNav">
  <p>
    <a href="index.html" target="_top">Show Menu</a>
    <a href="intro.html" target="_top">Hide Menu</a>
  </p>
</div>

<h1>Introduction to Ibator</h1>
<p>Ibator is a code generator for <a target="_blank" href="http://ibatis.apache.org">iBATIS</a>.
 Ibator generates code for all version of iBATIS after version 2.2.0 (including iBATIS 3).
 Ibator will introspect a database
 table (or many tables) and will generate iBATIS artifacts that can be used to
 access the table(s).  This lessens the initial nuisance of setting up objects and configuration
 files to interact with database tables.  Ibator seeks to make a major impact on the large
percentage of database operations that are simple CRUD (Create, Retrieve, Update, Delete).  You will
 still need to hand code SQL and objects for join queries, or stored procedures.
</p>
<p>Ibator will generate:</p>
<ul>
  <li>Java POJOs that match the table structure.  This may include:
    <ul>
      <li>a class to match the primary key of the table (if there is a primary key)</li>
      <li>a class to match the non-primary key fields of the table (except BLOB fields)</li>
      <li>a class to include the BLOB fields of a table (if the table has BLOB fields)</li>
      <li>a class to enable dynamic selects, updates, and deletes</li>
    </ul>
    <p>There is an inheritance relationship between these classes as appropriate.
       Note that Ibator may be configured to generate different types of POJO hierarchies -
       for example, you may choose to tell
       Ibator to generate a single domain object for each table if you so
       desire.</p>
  </li>
  <li>iBATIS Compatible SQL Map XML Files.  Ibator generates SQL for simple
   CRUD functions on each table in a configuration.  The generated SQL
   statements include:
    <ul>
      <li>insert</li>
      <li>update by primary key</li>
      <li>update by example (using a dynamic where clause)</li>
      <li>delete by primary key</li>
      <li>delete by example (using a dynamic where clause)</li>
      <li>select by primary key</li>
      <li>select by example (using a dynamic where clause)</li>
      <li>count by example</li>
    </ul>
   <p>There are different variations of these statements depending on the
   structure of the table (for example, if the table doesn't have a primary key,
   then Ibator will not generate an update by primary key function).</p>
  </li>
  <li>DAO interface and implementation classes that make appropriate use of the
    above objects.  The generation of DAO classes is optional.  Ibator will
    generate DAOs of the following types for iBATIS 2.x:
    <ul>
      <li>DAOs that conform to the
          <a target="_blank" href="http://www.springframework.org">Spring</a> framework</li>
      <li>DAOs that only use the iBATIS SQL mapping API.  These DAOs can be
          generated in two varieties: supplying the <code>SqlMapClient</code> through
          either constructor or setter injection.</li>
      <li>DAOs that conform to the iBATIS DAO Framework (an optional part of iBATIS, this
          framework is now deprecated and we suggest that you use the Spring framework
          instead)</li>
    </ul>
    Ibator will generate DAOs of the following type for iBATIS 3.x:
    <ul>
      <li>A mapper interface that works with the iBATIS 3.x mapper infrastructure</li>
    </ul>
  </li>
</ul>

<p>Ibator is designed to run well in an iterative development environment, and
  Ibator can even be included as an Ant task, or a Maven plugin, in a continuous
  build environment.
  Important things to note when running Ibator iteratively include:</p>

<ol>
  <li>Ibator will automatically merge XML files if there is an existing file
      with the same name as the newly generated XML file.  Ibator will not overwrite
      any custom changes you make to the XML files it generates.
      You can run it over and over again without fear of losing custom changes to you XML.
      Ibator will replace any XML elements that were generated in a previous run.
      </li>
  <li>Ibator will <b>not</b> merge Java files, it can either overwrite existing files
      or save newly generated files with a different unique name.  If you make changes
      to the generated Java files and run Ibator iteratively you will have to
      merge the changes by hand.  When run as an
      <a target="_blank" href="http://www.eclipse.org">Eclipse</a>
      plugin, then Ibator can automatically merge Java files.</li>
</ol>

<h2>Dependencies</h2>
<p>Ibator has no dependencies beyond the JRE.  Ibator does require JRE 5.0 or
above.  Ibator also requires that the JDBC driver implements the
DatabaseMetaData interface, especially the <code>getColumns</code> and
<code>getPrimaryKeys</code> methods.</p>

<h2>About the Name</h2>
<p>"Ibator" is an iBATIS styled version of the noun abator.  "Abator" means "one who
abates a nuisance".  This describes the purpose of Ibator - it abates some of the nuisance
of creating objects and configuration files for iBATIS.</p>

<h2>Support</h2>
<p>Support for Ibator is provided through the iBATIS user mailing list.
You may subscribe to the mailing list by sending a note to:</p>

<blockquote>
  <p>
  <a href="mailto:user-java-subscribe@ibatis.apache.org">user-java-subscribe@ibatis.apache.org</a>
  </p>
</blockquote>

<p>Once you have subscribed, you can mail questions or bug reports to:</p>
<blockquote>
  <p>
  <a href="mailto:user-java@ibatis.apache.org">user-java@ibatis.apache.org</a>
  </p>
</blockquote>

<p>If you want to unsubscribe from the mailing list, send a note to:</p>
<blockquote>
  <p>
  <a href="mailto:user-java-unsubscribe@ibatis.apache.org">user-java-unsubscribe@ibatis.apache.org</a>
  </p>
</blockquote>

<p>If you think you have found a bug, please ask a question about it on the user list first,
before creating a JIRA issue.  If you find a bug, or have a new feature request,
you may open a JIRA issue for Ibator at</p>

<blockquote>
  <p>
  <a target="_blank" href="http://issues.apache.org/jira/browse/IBATIS">
    http://issues.apache.org/jira/browse/IBATIS
  </a>
  </p>
</blockquote>

<p>Please select the "Ibator" component when creating any JIRA issues for Ibator.</p>

</body>
</html>